翻訳と辞書 |
unspecified behavior : ウィキペディア英語版 | unspecified behavior
Unspecified behavior is behavior that may vary on different implementations of a programming language. A program can be said to contain unspecified behavior when its source code may produce an executable that exhibits different behavior when compiled on a different compiler, or on the same compiler with different settings. While the respective language standards or specifications may impose a range of possible behaviors, the exact behavior depends on the implementation, and may not be completely determined upon examination of the program's source code.〔ISO/IEC (2009-05-29). ''ISO/IEC PDTR 24772.2: Guidance to Avoiding Vulnerabilities in Programming Languages through Language Selection and Use''〕 Unspecified behavior will often not manifest itself in the resulting program's external behavior, but it may sometimes lead to differing outputs or results, causing portability problems. ==Definition== To enable compilers to produce optimal code for their respective target platforms, programming language standards do not always impose a certain specific behavior for a given source code construct. Failing to explicitly define the exact behavior of every possible program is not considered an error or weakness in the language specification, and doing so would be infeasible.〔 In the C and C++ languages, such non-portable constructs are generally grouped into three categories: Implementation-defined, unspecified, and undefined behavior.〔 〕 The exact definition of unspecified behavior varies. In C++, it is defined as "behavior, for a well-formed program construct and correct data, that depends on the implementation."〔ISO/IEC (2003). ''ISO/IEC 14882:2003(E): Programming Languages - C++ §1.3.13 unspecified behavior ()''〕 Unlike implementation-defined behavior, there is no requirement for the implementation to document its behavior.〔 Similarly, the C Standard defines it as behavior for which the standard "provides two or more possibilities and imposes no further requirements on which is chosen in any instance".〔ISO/IEC (1999). ''ISO/IEC 9899:1999(E): Programming Languages - C §3.4.4 para 1''〕 The C++ Standard also notes that the range of possible behaviors is usually provided.〔 Unspecified behavior is different from undefined behavior. The latter is typically a result of an erroneous program construct or data, and no requirements are placed on the translation or execution of such constructs.〔ISO/IEC (2003). ''ISO/IEC 14882:2003(E): Programming Languages - C++ §1.3.12 undefined behavior ()''〕
抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「unspecified behavior」の詳細全文を読む
スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース |
Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.
|
|